﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="NodeTypeIcons.aspx.cs" 
Inherits="TypeManagement.Controls.NodeTypeIcons"
Title="<%$ Resources: Medianamik_TypeManagement, IconPickerWindowTitle %>" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" >
<head runat="server">

</head>
<body>
    <form id="form1" runat="server">
    <div>
    <script type="text/javascript">
			//This code is used to provide a reference to the radwindow "wrapper"
			function GetRadWindow()
			{
				var oWindow = null;
				if (window.radWindow) oWindow = window.radWindow;
				else if (window.frameElement.radWindow) oWindow = window.frameElement.radWindow;
				return oWindow;
			}		
			
			function Img_Clicked(img)
			{
			    var oWindow = GetRadWindow();
			    //On renvoit le "alt" car le "src" contient le nom de domaine.
			    var arg = new Object();
			    arg.imgSrc = img.alt;
				oWindow.close(arg);		
			}
				
		</script>
        <asp:Repeater runat="server" ID="rptIcons" DataSource="<%# GetFiles() %>">
            <ItemTemplate >
                <img alt="<%# Container.DataItem %>" src='<%# Container.DataItem %>' style="border:solid 1px #ccc"
                onclick="Img_Clicked(this)" />
            </ItemTemplate>
        </asp:Repeater>
    </div>
    </form>
</body>
</html>
